Moving multiple DXL-generated attributes from one column to multiple column

I am using the Analysis Wizard in DOORS 9.3 to capture linked attributes. The problem is the returned results have multiple attributes in a single column. In order to sort on the attributes, I need to place each individual attribute in a separate column. I'm not a DXL programmer, so I can't modify the code other than to put the attribute name in the code.

Any help would be appreciated. I'm on a pretty short timeline.

Thanks.

douglyle
lyleworks - Wed Jun 08 12:25:10 EDT 2011

Re: Moving multiple DXL-generated attributes from one column to multiple column
llandale - Wed Jun 08 15:17:26 EDT 2011

I don't use the Wizard much but you can tell it which attributes in that other module to display yes? Well, use the wizard and tell it attr A, then insert another column using the wizard and tell it to display attr B.

You should be able to open the current layout, copy the DXL code, and insert it into a couple new columns. I believe a novis should be able to search for your attribute names and see the two or three lines of code that deal with them and then delete them; perhaps looks like this:
..s = probeAttr_(oOther, "Attr A")
..display "Attr A\t" s
..s = probeAttr_(oOther, "Attr B")
..display "Attr B\t" s

Well, in the first layout delete the 2nd two lines and title the column "Attr A"; in the 2nd column delete the 1st two lines and label the column "Attr B".

  • Louie

Re: Moving multiple DXL-generated attributes from one column to multiple column
lyleworks - Thu Jun 09 10:39:25 EDT 2011

Louie, thanks so much for the response. The current code for the DXL wizard looks like this:

if (depth ==3){
disp = ""
s = probeRichAttr_(othero,"Configurable Item Name",false)
plain = probeAttr_(othero,"Configurable Item Name")
plainTextLen = length plain
if ((plainTextLen)> 40) s = cutRichText(s,40,plainTextLen)
disp = disp s
plainDisp = plainText disp
plainTextLen = length plainDisp
if ((plainTextLen) > 40) disp = cutRichText(disp,15,plainTextLen)
displayRich("\\pard " disp)

Where Configurable Item Name is the attribute that has multiple names in a single column. I would like to be able to put only one name in separate columns. Thanks for your help in advance.

douglyle

Re: Moving multiple DXL-generated attributes from one column to multiple column
llandale - Thu Jun 09 15:26:24 EDT 2011

lyleworks - Thu Jun 09 10:39:25 EDT 2011
Louie, thanks so much for the response. The current code for the DXL wizard looks like this:

if (depth ==3){
disp = ""
s = probeRichAttr_(othero,"Configurable Item Name",false)
plain = probeAttr_(othero,"Configurable Item Name")
plainTextLen = length plain
if ((plainTextLen)> 40) s = cutRichText(s,40,plainTextLen)
disp = disp s
plainDisp = plainText disp
plainTextLen = length plainDisp
if ((plainTextLen) > 40) disp = cutRichText(disp,15,plainTextLen)
displayRich("\\pard " disp)

Where Configurable Item Name is the attribute that has multiple names in a single column. I would like to be able to put only one name in separate columns. Thanks for your help in advance.

douglyle

Digressing: what hopeless code that wizard produces.

I see only one attribute displayed. I had originally thought you were following a single link and displaying more than one attribute for a single target object, but I now suspect you are displaying the same attribute value for multiple targets.

Links:

... A1 ->B1 ->C1
... A1 ->B2 ->C2

Perhaps you don't want to see the "Configurable Item Name" for both C1 and C2 in the same column displayed for A1; and are asking that the first linked object in C is displayed in column 1 and the 2nd displayed in column 2, etc.

That doesn't make much sense to me. Seems to me that you would WANT all the linked "Configurable Items" for each A requirement in the same column, so long as they were correctly labeled.

But if you insist you could fairly easily adjust the wizard code such that its counting the links, and only displaying when it has the "correct" count of links. So adjust the code to count the links going to C, then copy the code to each of 3 layouts, then adjust the code for the first column if LinkCount == 1; 2nd if LinkCount == 2.

  • Louie

Re: Moving multiple DXL-generated attributes from one column to multiple column
lyleworks - Fri Jun 10 11:00:43 EDT 2011

Louie,

You are absolutely correct. This is a customer request for layout purposes in a design document. Who can guess if it makes sense or not. I believe they want to be able to sort some 550 records on the individual configurable item name.

Your suggestion sounds right on, but as I mentioned, I'm not a DXL programmer and I'm not sure where you want me to put the code to count the links or what the syntax would be. I don't see any of the code you suggest in the script that I might be able to modify it.

Can you tell me where to put this code? After asking that question, I hope you don't say where I think you want me to put it! :)

Thanks.

douglyle

Re: Moving multiple DXL-generated attributes from one column to multiple column
llandale - Fri Jun 10 15:49:57 EDT 2011

lyleworks - Fri Jun 10 11:00:43 EDT 2011
Louie,

You are absolutely correct. This is a customer request for layout purposes in a design document. Who can guess if it makes sense or not. I believe they want to be able to sort some 550 records on the individual configurable item name.

Your suggestion sounds right on, but as I mentioned, I'm not a DXL programmer and I'm not sure where you want me to put the code to count the links or what the syntax would be. I don't see any of the code you suggest in the script that I might be able to modify it.

Can you tell me where to put this code? After asking that question, I hope you don't say where I think you want me to put it! :)

Thanks.

douglyle

I do not need to be encouraged to suggest places for folks to put stuff; I'm perfectly capable and willing to do that on my own. ..err.. I mean ... on my own!.

Post the code, we'll fix it.

In the mean time, slap your customer upside the head because he's asking for a specific finite number of pre-defined columns for information that is variable and potentially very large. What do to if you have 10 columns but 11 links? Add another column. But then we find one with 12? What about one with 33, when column max is 32?

As far as I can tell its pretty universal that meta-data is fixed and finite and displayed as columns, and data is variable and displayed as rows. i.e. the number of columns of a table is almost always fixed but not so the number of rows.

Perhaps instead we give him a column like this:

Configurable Items for A_23 are:
    c_12 "ABC",
        c_13 "DEF",
        c_2 "Xaa"


Then let him copy that into excel and use some macro chop it up into whatever methodologically repugnant way he wants.

 

 

  • Louie


Advise: I learned the hard way that one may THINK it, but one must not SAY "Methodologically Repugnant" to a customer.

Oh oh ... someone else's thoughts are projecting, again, into my head. Lets accumulate the list of linked C objects in a display buffer separated by a TAB or a TAB TAB, then 'display' that all at once. If we adjust cleverly the width of the column it will look like the above. However, when exported to Excel it will have no EOL except at the end and each entry will get into its own horizontal cell, and your customer gets what he wants ..err.. asked for.